#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable:6031)
#include<stdio.h>
int main()
{
        char ch;
        int n = 0;
        while (scanf("%c", &ch) == 1) 
        {
            if (ch >= 'a' && ch <= 'z')
                ch -= 32;
            else
                ch += 32;
            getchar();
            printf("%c\n", ch);
        }
        return 0;
}